Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbox2d.dynamics.joints
Class PrismaticJoint

    java.lang.Object
      org.jbox2d.dynamics.joints.Joint
          org.jbox2d.dynamics.joints.PrismaticJoint

    public class PrismaticJoint

extends Joint

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.

Field Summary
`float` | `m_angularMass`
`boolean` | `m_enableLimit`
`boolean` | `m_enableMotor`
`float` | `m_force`
`float` | `m_limitForce`
`float` | `m_limitPositionImpulse`
`LimitState` | `m_limitState`
`Jacobian` | `m_linearJacobian`
`float` | `m_linearMass`
`Vec2` | `m_localAnchor1`
`Vec2` | `m_localAnchor2`
`Vec2` | `m_localXAxis1`
`Vec2` | `m_localYAxis1`
`float` | `m_lowerTranslation`
`float` | `m_maxMotorForce`
`float` | `m_motorForce`
`Jacobian` | `m_motorJacobian`
`float` | `m_motorMass`
`float` | `m_motorSpeed`
`float` | `m_refAngle`
`float` | `m_torque`
`float` | `m_upperTranslation`

Fields inherited from class org.jbox2d.dynamics.joints.Joint
`m_body1, m_body2, m_collideConnected, m_islandFlag, m_next, m_node1, m_node2, m_prev, m_type, m_userData`

Constructor Summary
`PrismaticJoint(PrismaticJointDef def)`

Method Summary
`void` | `enableLimit(boolean flag)` Enable/disable the joint limit.
`void` | `enableMotor(boolean flag)` Enable/disable the joint motor.
`Vec2` | `getAnchor1()` Get the anchor point on body1 in world coordinates.
`Vec2` | `getAnchor2()` Get the anchor point on body2 in world coordinates.
`float` | `getJointSpeed()`
`float` | `getJointTranslation()`
`float` | `getLowerLimit()` Get the lower joint limit, usually in meters.
`float` | `getMotorForce()` Get the current motor torque, usually in N.
`float` | `getMotorSpeed()` Get the motor speed, usually in meters per second.
`Vec2` | `getReactionForce()` Get the reaction force on body2 at the joint anchor.
`float` | `getReactionTorque()` Get the reaction torque on body2.
`float` | `getUpperLimit()` Get the upper joint limit, usually in meters.
`void` | `initVelocityConstraints(TimeStep step)`
`boolean` | `isLimitEnabled()` Is the joint limit enabled?
`boolean` | `isMotorEnabled()` Is the joint motor enabled?
`void` | `setLimits(float lower, float upper)` Set the joint limits, usually in meters.
`void` | `setMaxMotorForce(float force)` Set the maximum motor torque, usually in N.
`void` | `setMotorSpeed(float speed)` Set the motor speed, usually in meters per second.
`boolean` | `solvePositionConstraints()` This returns true if the position errors are within tolerance.
`void` | `solveVelocityConstraints(TimeStep step)`

Methods inherited from class org.jbox2d.dynamics.joints.Joint
`create, destroy, destructor, getBody1, getBody2, getNext, getType, getUserData, initPositionConstraints`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_localAnchor1

    public Vec2 m_localAnchor1

### m_localAnchor2

    public Vec2 m_localAnchor2

### m_localXAxis1

    public Vec2 m_localXAxis1

### m_localYAxis1

    public Vec2 m_localYAxis1

### m_refAngle

    public float m_refAngle

### m_linearJacobian

    public Jacobian m_linearJacobian

### m_linearMass

    public float m_linearMass

### m_force

    public float m_force

### m_angularMass

    public float m_angularMass

### m_torque

    public float m_torque

### m_motorJacobian

    public Jacobian m_motorJacobian

### m_motorMass

    public float m_motorMass

### m_motorForce

    public float m_motorForce

### m_limitForce

    public float m_limitForce

### m_limitPositionImpulse

    public float m_limitPositionImpulse

### m_lowerTranslation

    public float m_lowerTranslation

### m_upperTranslation

    public float m_upperTranslation

### m_maxMotorForce

    public float m_maxMotorForce

### m_motorSpeed

    public float m_motorSpeed

### m_enableLimit

    public boolean m_enableLimit

### m_enableMotor

    public boolean m_enableMotor

### m_limitState

    public LimitState m_limitState

Constructor Detail

### PrismaticJoint

    public PrismaticJoint(PrismaticJointDef def)

Method Detail

### initVelocityConstraints

    public void initVelocityConstraints(TimeStep step)

  Specified by:
    `initVelocityConstraints` in class `Joint`

### solveVelocityConstraints

    public void solveVelocityConstraints(TimeStep step)

  Specified by:
    `solveVelocityConstraints` in class `Joint`

### solvePositionConstraints

    public boolean solvePositionConstraints()

  Description copied from class: `Joint`
  This returns true if the position errors are within tolerance.

  Specified by:
    `solvePositionConstraints` in class `Joint`

### getAnchor1

    public Vec2 getAnchor1()

  Description copied from class: `Joint`
  Get the anchor point on body1 in world coordinates.

  Specified by:
    `getAnchor1` in class `Joint`

### getAnchor2

    public Vec2 getAnchor2()

  Description copied from class: `Joint`
  Get the anchor point on body2 in world coordinates.

  Specified by:
    `getAnchor2` in class `Joint`

### getJointTranslation

    public float getJointTranslation()

### getJointSpeed

    public float getJointSpeed()

### getReactionTorque

    public float getReactionTorque()

  Description copied from class: `Joint`
  Get the reaction torque on body2.

  Specified by:
    `getReactionTorque` in class `Joint`

### getReactionForce

    public Vec2 getReactionForce()

  Description copied from class: `Joint`
  Get the reaction force on body2 at the joint anchor.

  Specified by:
    `getReactionForce` in class `Joint`

### isLimitEnabled

    public boolean isLimitEnabled()

  Is the joint limit enabled?

### enableLimit

    public void enableLimit(boolean flag)

  Enable/disable the joint limit.

### getLowerLimit

    public float getLowerLimit()

  Get the lower joint limit, usually in meters.

### getUpperLimit

    public float getUpperLimit()

  Get the upper joint limit, usually in meters.

### setLimits

    public void setLimits(float lower,
                          float upper)

  Set the joint limits, usually in meters.

### isMotorEnabled

    public boolean isMotorEnabled()

  Is the joint motor enabled?

### enableMotor

    public void enableMotor(boolean flag)

  Enable/disable the joint motor.

### setMotorSpeed

    public void setMotorSpeed(float speed)

  Set the motor speed, usually in meters per second.

### getMotorSpeed

    public float getMotorSpeed()

  Get the motor speed, usually in meters per second.

### setMaxMotorForce

    public void setMaxMotorForce(float force)

  Set the maximum motor torque, usually in N.

### getMotorForce

    public float getMotorForce()

  Get the current motor torque, usually in N.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD